// Copyright [2020] <unknown>
#include <bits/stdc++.h>
using namespace std;
// #define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
#define dbg(x...) { cerr << "\033[32;1m" << #x << " -> "; err(x); }
void err() { cerr << "\033[39;0m" << endl; }
template<typename T, typename... A>
void err(T a, A... x) { cerr << a << ' '; err(x...); }
#else
#define dbg(...)
#endif

#define sz(x) ((int)x.size())

typedef long long LL;

int t, n;

const int N = 1e5+50;

bool dp[N][3];

int x, y, z;
bool calc(int i, int mask) {
    bool res = 1;
    if ((mask & 1) && i >= x)
        res = res && dp[i-x][0];
    if ((mask & 2) && i >= y)
        res = res && dp[i-y][1];
    if ((mask & 4) && i >= z)
        res = res && dp[i-z][2];
    return res;
}

int main(int argc, char const *argv[]) {
    
    scanf("%d%d%d", &x, &y, &z);

    // dbg(calc(1, 7));

    for (int i=1; i<N; ++i) {
        dp[i][0] = !calc(i, 7);
        dp[i][1] = !calc(i, 5);
        dp[i][2] = !calc(i, 3);
    }

    for (int i=0; i<30; ++i) {
        printf("%d: ", i);
        printf("%d %d %d\n", dp[i][0], dp[i][1], dp[i][2]);
    }
    return 0;
}
